<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
<script src="${webPath}/static/scripts/jquery-3.1.1.min.js"></script>
<script type="text/javascript">

function changePic(){
	alert($("#fileUpload")[0].files);
};
	/* $(function () {
		 $("#upload").click(function(){
			 $.ajax({
		    		type : "POST",
		    		url  : "${webPath}/test/upload",
		    		data : {
		    			"image" : $().
		    		},
		    		beforeSend : function() {
		    			loadingIndex = layer.msg('处理中', {icon: 16});
		    		},
		    		success : function(result) {
		    			layer.close(loadingIndex);
		    			if ( result.success ) {
	                        layer.msg("上传成功！", {time:1000, icon:6}, function(){
	                        });
		    			} else {
	                        layer.msg("上传失败，请重新操作！", {time:2000, icon:5, shift:6}, function(){
	                        });
		    			}
		    		}
		    	});
		 }
	} */
</script>
</head>
<body>
	<div class="panel panel-warning">
		<div class="panel-heading">
			<h2>Java 实现图片等比例缩略图</h2>
		</div>
		<div class="panel-body">
			<form action="thumbnail" method="post" enctype="multipart/form-data">
				<h2>请选择上传的图片</h2>
				<div class="form-group">
					<input type="file" name="image" id="fileUpload" onchange="changePic()"/>
				</div>
			</form>
		</div>
		<div id='dd'></div>
	</div>
</body>
</html>